package com.bawei.a2010douyin.ui.tuijian;

import com.bawei.a2010douyin.base.mvp.BaseView;
import com.bawei.a2010douyin.entity.BaseResponse;
import com.bawei.a2010douyin.entity.CommentEntity;
import com.bawei.a2010douyin.entity.VideoEntity;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.Query;
//契约
public interface TuiJianContract {
    //model:请求数据：BaseResponse响应信息基类：响应吗 响应消息  数据List<VideoEntity>
    interface ITuiJianModel{
        Observable<BaseResponse<List<VideoEntity>>> video(int currentPage,int pageSize);//视频
        Observable<BaseResponse<String>> love( int videoId);//点赞
        Observable<BaseResponse<String>> nolove( int videoId);//取消点赞
        Observable<BaseResponse<String>> guanzhu( RequestBody requestBody);//关注
        Observable<BaseResponse<List<CommentEntity>>> comment(int videoId);//获得评论
        Observable<BaseResponse<List<CommentEntity>>> sendComment( RequestBody requestBody);//发表评论
    }
    //view：展示UI 数据List<VideoEntity>
    interface ITuiJianView extends BaseView {
        void showVideo(List<VideoEntity> data);
        void love(String data);
        void nolove(String data);
        void guanzhu(String data);
        void showComment(List<CommentEntity> data);
        void showSendComment(List<CommentEntity> data);

    }

    interface ITuiJianPresenter{
        void video(int currentPage,int pageSize);
        void love( int videoId);
        void nolove( int videoId);
        void guanzhu( RequestBody requestBody);
        void  comment(int videoId);
        void sendComment( RequestBody requestBody);//发表评论
    }
}
